\hypertarget{class_j_s_o_n_node}{\section{J\+S\+O\+N\+Node类 参考}
\label{class_j_s_o_n_node}\index{J\+S\+O\+N\+Node@{J\+S\+O\+N\+Node}}
}


J\+S\+O\+N结点类.  




{\ttfamily \#include $<$J\+S\+O\+N\+Data.\+h$>$}

\subsection*{Public 成员函数}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_j_s_o_n_node_a4332edc9aa95b561ddab12f77d000039}{J\+S\+O\+N\+Node} ()
\begin{DoxyCompactList}\small\item\em J\+S\+O\+N\+Node构造函数 \end{DoxyCompactList}\item 
\hyperlink{class_j_s_o_n_node_a6c2284bd6ce621636f9ba02d161b4030}{$\sim$\+J\+S\+O\+N\+Node} ()
\begin{DoxyCompactList}\small\item\em J\+S\+O\+N\+Node析构函数 \end{DoxyCompactList}\item 
\hyperlink{class_j_s_o_n_node_ad1244785c8e153352fb0984acec90744}{J\+S\+O\+N\+Node} (const \hyperlink{class_j_s_o_n_node}{J\+S\+O\+N\+Node} \&node)
\begin{DoxyCompactList}\small\item\em J\+S\+O\+N\+Node拷贝构造函数 \end{DoxyCompactList}\item 
std\+::string \hyperlink{class_j_s_o_n_node_a1d5507e362f049c46a8cbaf4cf44a730}{serialize} (bool fmt=false)
\begin{DoxyCompactList}\small\item\em 返回串行化后的字符串 \end{DoxyCompactList}\item 
bool \hyperlink{class_j_s_o_n_node_ae9ace6642be9ee68f1a06586ae2415da}{has\+Sub\+Node} (const std\+::string node\+Name)
\begin{DoxyCompactList}\small\item\em 判断是否存在node\+Name结点 \end{DoxyCompactList}\item 
bool \hyperlink{class_j_s_o_n_node_a87597bba651e9d48861be2178e37926f}{is\+Null\+Node} ()
\begin{DoxyCompactList}\small\item\em 判断结点是否是\+N\+U\+L\+L结点 \end{DoxyCompactList}\item 
bool \hyperlink{class_j_s_o_n_node_a53f873c32ad08ed4ded611213a46d448}{is\+Array\+Node} ()
\begin{DoxyCompactList}\small\item\em 判断结点是否是数组型结点 \end{DoxyCompactList}\item 
sint32 \hyperlink{class_j_s_o_n_node_a7d60d2fd3887f4a2b33ebbdd578aeaa8}{get\+Array\+Size} ()
\begin{DoxyCompactList}\small\item\em 根据index获取数组的大小 \end{DoxyCompactList}\item 
\hyperlink{class_j_s_o_n_node}{J\+S\+O\+N\+Node} \hyperlink{class_j_s_o_n_node_a9e9e78a2ba11a3fc05120c52ef80aed9}{operator\mbox{[}$\,$\mbox{]}} (const std\+::string node\+Name)
\begin{DoxyCompactList}\small\item\em 根据结点名称node\+Name获取子结点 \end{DoxyCompactList}\item 
\hyperlink{class_j_s_o_n_node}{J\+S\+O\+N\+Node} \hyperlink{class_j_s_o_n_node_a32aa55a0478d6efb0a88d9499467ea75}{operator\mbox{[}$\,$\mbox{]}} (sint32 index)
\begin{DoxyCompactList}\small\item\em 根据index获取数组结点里的元素结点 \end{DoxyCompactList}\item 
bool \hyperlink{class_j_s_o_n_node_a0d11b8b05d71de2597ac4abf08d219a8}{bool\+Value} ()
\begin{DoxyCompactList}\small\item\em 返回结点的布尔值 \end{DoxyCompactList}\item 
sint32 \hyperlink{class_j_s_o_n_node_af3cd36a1709f29078d5aa66b5cf21169}{int\+Value} ()
\begin{DoxyCompactList}\small\item\em 返回结点的整形值 \end{DoxyCompactList}\item 
double \hyperlink{class_j_s_o_n_node_ab0d2ef99e6a84b764708d136e36fbf80}{double\+Value} ()
\begin{DoxyCompactList}\small\item\em 返回结点的浮点值 \end{DoxyCompactList}\item 
std\+::string \hyperlink{class_j_s_o_n_node_a43a1eb525136c9c101975ff4212acfce}{string\+Value} ()
\begin{DoxyCompactList}\small\item\em 返回结点的字符串值 \end{DoxyCompactList}\item 
\hypertarget{class_j_s_o_n_node_a966e454271c67287b2047d5f43dc96ab}{\hyperlink{class_j_s_o_n_node}{J\+S\+O\+N\+Node} {\bfseries node\+Value} ()}\label{class_j_s_o_n_node_a966e454271c67287b2047d5f43dc96ab}

\item 
bool \hyperlink{class_j_s_o_n_node_adb4b70260a7a19410b09458f934dcb5b}{add\+Sub\+Node} (const std\+::string node\+Name=\char`\"{}\char`\"{})
\begin{DoxyCompactList}\small\item\em 加入\+N\+U\+L\+L子结点 \end{DoxyCompactList}\item 
bool \hyperlink{class_j_s_o_n_node_ab1bfa7eddb776dd256593680f9c923dd}{add\+Sub\+Node} (bool value, const std\+::string node\+Name=\char`\"{}\char`\"{})
\begin{DoxyCompactList}\small\item\em 加入布尔值子结点 \end{DoxyCompactList}\item 
bool \hyperlink{class_j_s_o_n_node_a38ade0ebf4d5499778ad60b3e0bad194}{add\+Sub\+Node} (int value, const std\+::string node\+Name=\char`\"{}\char`\"{})
\begin{DoxyCompactList}\small\item\em 加入数字值子结点 \end{DoxyCompactList}\item 
bool \hyperlink{class_j_s_o_n_node_aee6fa32de551c2f73eeeeddf5a99ee1f}{add\+Sub\+Node} (double value, const std\+::string node\+Name=\char`\"{}\char`\"{})
\begin{DoxyCompactList}\small\item\em 加入数字值子结点 \end{DoxyCompactList}\item 
bool \hyperlink{class_j_s_o_n_node_aacf07ddc07c0157aa22433b34a7b60c3}{add\+Sub\+Node} (const std\+::string \hyperlink{class_j_s_o_n_node_a43a1eb525136c9c101975ff4212acfce}{string\+Value}, const std\+::string node\+Name=\char`\"{}\char`\"{})
\begin{DoxyCompactList}\small\item\em 加入字符串子结点 \end{DoxyCompactList}\item 
bool \hyperlink{class_j_s_o_n_node_adc37c63365bec0eeee8457084a37e690}{add\+Sub\+Node} (const char $\ast$$\ast$array\+String, sint32 count, const std\+::string node\+Name=\char`\"{}\char`\"{})
\begin{DoxyCompactList}\small\item\em 加入字符串数组子结点 \end{DoxyCompactList}\item 
bool \hyperlink{class_j_s_o_n_node_ad9a702ab7b5fe9887e46ca2499ecf199}{add\+Sub\+Node} (const int $\ast$int\+Array, sint32 count, const std\+::string node\+Name=\char`\"{}\char`\"{})
\begin{DoxyCompactList}\small\item\em 加入整型数组子结点 \end{DoxyCompactList}\item 
bool \hyperlink{class_j_s_o_n_node_a9bec39ea19ae6678dc8c33e7bb9c2056}{add\+Sub\+Node} (const float $\ast$float\+Array, sint32 count, const std\+::string node\+Name=\char`\"{}\char`\"{})
\begin{DoxyCompactList}\small\item\em 加入float型数组子结点 \end{DoxyCompactList}\item 
bool \hyperlink{class_j_s_o_n_node_a7e781e9785f28de4512d91e21ef9a424}{add\+Sub\+Node} (const double $\ast$double\+Array, sint32 count, const std\+::string node\+Name=\char`\"{}\char`\"{})
\begin{DoxyCompactList}\small\item\em 加入double型数组子结点 \end{DoxyCompactList}\item 
bool \hyperlink{class_j_s_o_n_node_af22b244d4b131d279678d71b30ba8c75}{add\+Sub\+Node} (\hyperlink{class_j_s_o_n_node}{J\+S\+O\+N\+Node} $\ast$object, const std\+::string node\+Name=\char`\"{}\char`\"{})
\begin{DoxyCompactList}\small\item\em 加入\+J\+S\+O\+N对象子结点 \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{友元}
\begin{DoxyCompactItemize}
\item 
\hypertarget{class_j_s_o_n_node_af0ba809ecd8e176b8e52899a46368563}{class {\bfseries J\+S\+O\+N\+Data}}\label{class_j_s_o_n_node_af0ba809ecd8e176b8e52899a46368563}

\end{DoxyCompactItemize}


\subsection{详细描述}
J\+S\+O\+N结点类. 

\subsection{构造及析构函数说明}
\hypertarget{class_j_s_o_n_node_a4332edc9aa95b561ddab12f77d000039}{\index{J\+S\+O\+N\+Node@{J\+S\+O\+N\+Node}!J\+S\+O\+N\+Node@{J\+S\+O\+N\+Node}}
\index{J\+S\+O\+N\+Node@{J\+S\+O\+N\+Node}!J\+S\+O\+N\+Node@{J\+S\+O\+N\+Node}}
\subsubsection[{J\+S\+O\+N\+Node}]{\setlength{\rightskip}{0pt plus 5cm}J\+S\+O\+N\+Node\+::\+J\+S\+O\+N\+Node (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{class_j_s_o_n_node_a4332edc9aa95b561ddab12f77d000039}


J\+S\+O\+N\+Node构造函数 


\begin{DoxyParams}{参数}
{\em none} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
none 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
J\+S\+O\+N\+Node代表一个用key\+:value表示的\+J\+S\+O\+N子结点 
\end{DoxyNote}
\hypertarget{class_j_s_o_n_node_a6c2284bd6ce621636f9ba02d161b4030}{\index{J\+S\+O\+N\+Node@{J\+S\+O\+N\+Node}!````~J\+S\+O\+N\+Node@{$\sim$\+J\+S\+O\+N\+Node}}
\index{````~J\+S\+O\+N\+Node@{$\sim$\+J\+S\+O\+N\+Node}!J\+S\+O\+N\+Node@{J\+S\+O\+N\+Node}}
\subsubsection[{$\sim$\+J\+S\+O\+N\+Node}]{\setlength{\rightskip}{0pt plus 5cm}J\+S\+O\+N\+Node\+::$\sim$\+J\+S\+O\+N\+Node (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{class_j_s_o_n_node_a6c2284bd6ce621636f9ba02d161b4030}


J\+S\+O\+N\+Node析构函数 


\begin{DoxyParams}{参数}
{\em none} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
none 
\end{DoxyReturn}
\hypertarget{class_j_s_o_n_node_ad1244785c8e153352fb0984acec90744}{\index{J\+S\+O\+N\+Node@{J\+S\+O\+N\+Node}!J\+S\+O\+N\+Node@{J\+S\+O\+N\+Node}}
\index{J\+S\+O\+N\+Node@{J\+S\+O\+N\+Node}!J\+S\+O\+N\+Node@{J\+S\+O\+N\+Node}}
\subsubsection[{J\+S\+O\+N\+Node}]{\setlength{\rightskip}{0pt plus 5cm}J\+S\+O\+N\+Node\+::\+J\+S\+O\+N\+Node (
\begin{DoxyParamCaption}
\item[{const {\bf J\+S\+O\+N\+Node} \&}]{node}
\end{DoxyParamCaption}
)}}\label{class_j_s_o_n_node_ad1244785c8e153352fb0984acec90744}


J\+S\+O\+N\+Node拷贝构造函数 


\begin{DoxyParams}{参数}
{\em none} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
none 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
用于值传递用,浅拷贝(不拷贝c\+J\+S\+O\+N里的数据) 
\end{DoxyNote}


\subsection{成员函数说明}
\hypertarget{class_j_s_o_n_node_adb4b70260a7a19410b09458f934dcb5b}{\index{J\+S\+O\+N\+Node@{J\+S\+O\+N\+Node}!add\+Sub\+Node@{add\+Sub\+Node}}
\index{add\+Sub\+Node@{add\+Sub\+Node}!J\+S\+O\+N\+Node@{J\+S\+O\+N\+Node}}
\subsubsection[{add\+Sub\+Node}]{\setlength{\rightskip}{0pt plus 5cm}bool J\+S\+O\+N\+Node\+::add\+Sub\+Node (
\begin{DoxyParamCaption}
\item[{const std\+::string}]{node\+Name = {\ttfamily \char`\"{}\char`\"{}}}
\end{DoxyParamCaption}
)}}\label{class_j_s_o_n_node_adb4b70260a7a19410b09458f934dcb5b}


加入\+N\+U\+L\+L子结点 


\begin{DoxyParams}{参数}
{\em node\+Name} & 名称字串 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
成功返回true,失败返回false 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
当\+J\+S\+O\+N数据为数组格式时,node\+Name可省略 
\end{DoxyNote}
\hypertarget{class_j_s_o_n_node_ab1bfa7eddb776dd256593680f9c923dd}{\index{J\+S\+O\+N\+Node@{J\+S\+O\+N\+Node}!add\+Sub\+Node@{add\+Sub\+Node}}
\index{add\+Sub\+Node@{add\+Sub\+Node}!J\+S\+O\+N\+Node@{J\+S\+O\+N\+Node}}
\subsubsection[{add\+Sub\+Node}]{\setlength{\rightskip}{0pt plus 5cm}bool J\+S\+O\+N\+Node\+::add\+Sub\+Node (
\begin{DoxyParamCaption}
\item[{bool}]{value, }
\item[{const std\+::string}]{node\+Name = {\ttfamily \char`\"{}\char`\"{}}}
\end{DoxyParamCaption}
)}}\label{class_j_s_o_n_node_ab1bfa7eddb776dd256593680f9c923dd}


加入布尔值子结点 


\begin{DoxyParams}{参数}
{\em node\+Name} & 名称字串 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
成功返回true,失败返回false 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
当\+J\+S\+O\+N数据为数组格式时,node\+Name可省略 
\end{DoxyNote}
\hypertarget{class_j_s_o_n_node_a38ade0ebf4d5499778ad60b3e0bad194}{\index{J\+S\+O\+N\+Node@{J\+S\+O\+N\+Node}!add\+Sub\+Node@{add\+Sub\+Node}}
\index{add\+Sub\+Node@{add\+Sub\+Node}!J\+S\+O\+N\+Node@{J\+S\+O\+N\+Node}}
\subsubsection[{add\+Sub\+Node}]{\setlength{\rightskip}{0pt plus 5cm}bool J\+S\+O\+N\+Node\+::add\+Sub\+Node (
\begin{DoxyParamCaption}
\item[{int}]{value, }
\item[{const std\+::string}]{node\+Name = {\ttfamily \char`\"{}\char`\"{}}}
\end{DoxyParamCaption}
)}}\label{class_j_s_o_n_node_a38ade0ebf4d5499778ad60b3e0bad194}


加入数字值子结点 


\begin{DoxyParams}{参数}
{\em node\+Name} & 名称字串 \\
\hline
{\em value} & 整数或浮点数 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
成功返回true,失败返回false 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
当\+J\+S\+O\+N数据为数组格式时,node\+Name可省略 
\end{DoxyNote}
\hypertarget{class_j_s_o_n_node_aee6fa32de551c2f73eeeeddf5a99ee1f}{\index{J\+S\+O\+N\+Node@{J\+S\+O\+N\+Node}!add\+Sub\+Node@{add\+Sub\+Node}}
\index{add\+Sub\+Node@{add\+Sub\+Node}!J\+S\+O\+N\+Node@{J\+S\+O\+N\+Node}}
\subsubsection[{add\+Sub\+Node}]{\setlength{\rightskip}{0pt plus 5cm}bool J\+S\+O\+N\+Node\+::add\+Sub\+Node (
\begin{DoxyParamCaption}
\item[{double}]{value, }
\item[{const std\+::string}]{node\+Name = {\ttfamily \char`\"{}\char`\"{}}}
\end{DoxyParamCaption}
)}}\label{class_j_s_o_n_node_aee6fa32de551c2f73eeeeddf5a99ee1f}


加入数字值子结点 


\begin{DoxyParams}{参数}
{\em node\+Name} & 名称字串 \\
\hline
{\em value} & 整数或浮点数 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
成功返回true,失败返回false 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
当\+J\+S\+O\+N数据为数组格式时,node\+Name可省略 
\end{DoxyNote}
\hypertarget{class_j_s_o_n_node_aacf07ddc07c0157aa22433b34a7b60c3}{\index{J\+S\+O\+N\+Node@{J\+S\+O\+N\+Node}!add\+Sub\+Node@{add\+Sub\+Node}}
\index{add\+Sub\+Node@{add\+Sub\+Node}!J\+S\+O\+N\+Node@{J\+S\+O\+N\+Node}}
\subsubsection[{add\+Sub\+Node}]{\setlength{\rightskip}{0pt plus 5cm}bool J\+S\+O\+N\+Node\+::add\+Sub\+Node (
\begin{DoxyParamCaption}
\item[{const std\+::string}]{value, }
\item[{const std\+::string}]{node\+Name = {\ttfamily \char`\"{}\char`\"{}}}
\end{DoxyParamCaption}
)}}\label{class_j_s_o_n_node_aacf07ddc07c0157aa22433b34a7b60c3}


加入字符串子结点 


\begin{DoxyParams}{参数}
{\em node\+Name} & 名称字串 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
成功返回true,失败返回false 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
当\+J\+S\+O\+N数据为数组格式时,node\+Name可省略 
\end{DoxyNote}
\hypertarget{class_j_s_o_n_node_adc37c63365bec0eeee8457084a37e690}{\index{J\+S\+O\+N\+Node@{J\+S\+O\+N\+Node}!add\+Sub\+Node@{add\+Sub\+Node}}
\index{add\+Sub\+Node@{add\+Sub\+Node}!J\+S\+O\+N\+Node@{J\+S\+O\+N\+Node}}
\subsubsection[{add\+Sub\+Node}]{\setlength{\rightskip}{0pt plus 5cm}bool J\+S\+O\+N\+Node\+::add\+Sub\+Node (
\begin{DoxyParamCaption}
\item[{const char $\ast$$\ast$}]{array\+String, }
\item[{sint32}]{count, }
\item[{const std\+::string}]{node\+Name = {\ttfamily \char`\"{}\char`\"{}}}
\end{DoxyParamCaption}
)}}\label{class_j_s_o_n_node_adc37c63365bec0eeee8457084a37e690}


加入字符串数组子结点 


\begin{DoxyParams}{参数}
{\em node\+Name} & 名称字串 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
成功返回true,失败返回false 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
当\+J\+S\+O\+N数据为数组格式时,node\+Name可省略 
\end{DoxyNote}
\hypertarget{class_j_s_o_n_node_ad9a702ab7b5fe9887e46ca2499ecf199}{\index{J\+S\+O\+N\+Node@{J\+S\+O\+N\+Node}!add\+Sub\+Node@{add\+Sub\+Node}}
\index{add\+Sub\+Node@{add\+Sub\+Node}!J\+S\+O\+N\+Node@{J\+S\+O\+N\+Node}}
\subsubsection[{add\+Sub\+Node}]{\setlength{\rightskip}{0pt plus 5cm}bool J\+S\+O\+N\+Node\+::add\+Sub\+Node (
\begin{DoxyParamCaption}
\item[{const int $\ast$}]{int\+Array, }
\item[{sint32}]{count, }
\item[{const std\+::string}]{node\+Name = {\ttfamily \char`\"{}\char`\"{}}}
\end{DoxyParamCaption}
)}}\label{class_j_s_o_n_node_ad9a702ab7b5fe9887e46ca2499ecf199}


加入整型数组子结点 


\begin{DoxyParams}{参数}
{\em node\+Name} & 名称字串 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
成功返回true,失败返回false 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
当\+J\+S\+O\+N数据为数组格式时,node\+Name可省略 
\end{DoxyNote}
\hypertarget{class_j_s_o_n_node_a9bec39ea19ae6678dc8c33e7bb9c2056}{\index{J\+S\+O\+N\+Node@{J\+S\+O\+N\+Node}!add\+Sub\+Node@{add\+Sub\+Node}}
\index{add\+Sub\+Node@{add\+Sub\+Node}!J\+S\+O\+N\+Node@{J\+S\+O\+N\+Node}}
\subsubsection[{add\+Sub\+Node}]{\setlength{\rightskip}{0pt plus 5cm}bool J\+S\+O\+N\+Node\+::add\+Sub\+Node (
\begin{DoxyParamCaption}
\item[{const float $\ast$}]{float\+Array, }
\item[{sint32}]{count, }
\item[{const std\+::string}]{node\+Name = {\ttfamily \char`\"{}\char`\"{}}}
\end{DoxyParamCaption}
)}}\label{class_j_s_o_n_node_a9bec39ea19ae6678dc8c33e7bb9c2056}


加入float型数组子结点 


\begin{DoxyParams}{参数}
{\em node\+Name} & 名称字串 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
成功返回true,失败返回false 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
当\+J\+S\+O\+N数据为数组格式时,node\+Name可省略 
\end{DoxyNote}
\hypertarget{class_j_s_o_n_node_a7e781e9785f28de4512d91e21ef9a424}{\index{J\+S\+O\+N\+Node@{J\+S\+O\+N\+Node}!add\+Sub\+Node@{add\+Sub\+Node}}
\index{add\+Sub\+Node@{add\+Sub\+Node}!J\+S\+O\+N\+Node@{J\+S\+O\+N\+Node}}
\subsubsection[{add\+Sub\+Node}]{\setlength{\rightskip}{0pt plus 5cm}bool J\+S\+O\+N\+Node\+::add\+Sub\+Node (
\begin{DoxyParamCaption}
\item[{const double $\ast$}]{double\+Array, }
\item[{sint32}]{count, }
\item[{const std\+::string}]{node\+Name = {\ttfamily \char`\"{}\char`\"{}}}
\end{DoxyParamCaption}
)}}\label{class_j_s_o_n_node_a7e781e9785f28de4512d91e21ef9a424}


加入double型数组子结点 


\begin{DoxyParams}{参数}
{\em node\+Name} & 名称字串 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
成功返回true,失败返回false 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
当\+J\+S\+O\+N数据为数组格式时,node\+Name可省略 
\end{DoxyNote}
\hypertarget{class_j_s_o_n_node_af22b244d4b131d279678d71b30ba8c75}{\index{J\+S\+O\+N\+Node@{J\+S\+O\+N\+Node}!add\+Sub\+Node@{add\+Sub\+Node}}
\index{add\+Sub\+Node@{add\+Sub\+Node}!J\+S\+O\+N\+Node@{J\+S\+O\+N\+Node}}
\subsubsection[{add\+Sub\+Node}]{\setlength{\rightskip}{0pt plus 5cm}bool J\+S\+O\+N\+Node\+::add\+Sub\+Node (
\begin{DoxyParamCaption}
\item[{{\bf J\+S\+O\+N\+Node} $\ast$}]{object, }
\item[{const std\+::string}]{node\+Name = {\ttfamily \char`\"{}\char`\"{}}}
\end{DoxyParamCaption}
)}}\label{class_j_s_o_n_node_af22b244d4b131d279678d71b30ba8c75}


加入\+J\+S\+O\+N对象子结点 


\begin{DoxyParams}{参数}
{\em node\+Name} & 名称字串 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
成功返回true,失败返回false 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
当\+J\+S\+O\+N数据为数组格式时,node\+Name可省略 
\end{DoxyNote}
\hypertarget{class_j_s_o_n_node_a0d11b8b05d71de2597ac4abf08d219a8}{\index{J\+S\+O\+N\+Node@{J\+S\+O\+N\+Node}!bool\+Value@{bool\+Value}}
\index{bool\+Value@{bool\+Value}!J\+S\+O\+N\+Node@{J\+S\+O\+N\+Node}}
\subsubsection[{bool\+Value}]{\setlength{\rightskip}{0pt plus 5cm}bool J\+S\+O\+N\+Node\+::bool\+Value (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{class_j_s_o_n_node_a0d11b8b05d71de2597ac4abf08d219a8}


返回结点的布尔值 


\begin{DoxyParams}{参数}
{\em none} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
false or true 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
none 
\end{DoxyNote}
\hypertarget{class_j_s_o_n_node_ab0d2ef99e6a84b764708d136e36fbf80}{\index{J\+S\+O\+N\+Node@{J\+S\+O\+N\+Node}!double\+Value@{double\+Value}}
\index{double\+Value@{double\+Value}!J\+S\+O\+N\+Node@{J\+S\+O\+N\+Node}}
\subsubsection[{double\+Value}]{\setlength{\rightskip}{0pt plus 5cm}double J\+S\+O\+N\+Node\+::double\+Value (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{class_j_s_o_n_node_ab0d2ef99e6a84b764708d136e36fbf80}


返回结点的浮点值 


\begin{DoxyParams}{参数}
{\em none} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
double 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
none 
\end{DoxyNote}
\hypertarget{class_j_s_o_n_node_a7d60d2fd3887f4a2b33ebbdd578aeaa8}{\index{J\+S\+O\+N\+Node@{J\+S\+O\+N\+Node}!get\+Array\+Size@{get\+Array\+Size}}
\index{get\+Array\+Size@{get\+Array\+Size}!J\+S\+O\+N\+Node@{J\+S\+O\+N\+Node}}
\subsubsection[{get\+Array\+Size}]{\setlength{\rightskip}{0pt plus 5cm}sint32 J\+S\+O\+N\+Node\+::get\+Array\+Size (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{class_j_s_o_n_node_a7d60d2fd3887f4a2b33ebbdd578aeaa8}


根据index获取数组的大小 


\begin{DoxyParams}{参数}
{\em sint32} & index \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
返回数组结点里的元素(结点)个数 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
none 
\end{DoxyNote}
\hypertarget{class_j_s_o_n_node_ae9ace6642be9ee68f1a06586ae2415da}{\index{J\+S\+O\+N\+Node@{J\+S\+O\+N\+Node}!has\+Sub\+Node@{has\+Sub\+Node}}
\index{has\+Sub\+Node@{has\+Sub\+Node}!J\+S\+O\+N\+Node@{J\+S\+O\+N\+Node}}
\subsubsection[{has\+Sub\+Node}]{\setlength{\rightskip}{0pt plus 5cm}bool J\+S\+O\+N\+Node\+::has\+Sub\+Node (
\begin{DoxyParamCaption}
\item[{const std\+::string}]{node\+Name}
\end{DoxyParamCaption}
)}}\label{class_j_s_o_n_node_ae9ace6642be9ee68f1a06586ae2415da}


判断是否存在node\+Name结点 


\begin{DoxyParams}{参数}
{\em node\+Name} & 结点名称字符串 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
存在返回true,不存在返回false 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
none 
\end{DoxyNote}
\hypertarget{class_j_s_o_n_node_af3cd36a1709f29078d5aa66b5cf21169}{\index{J\+S\+O\+N\+Node@{J\+S\+O\+N\+Node}!int\+Value@{int\+Value}}
\index{int\+Value@{int\+Value}!J\+S\+O\+N\+Node@{J\+S\+O\+N\+Node}}
\subsubsection[{int\+Value}]{\setlength{\rightskip}{0pt plus 5cm}sint32 J\+S\+O\+N\+Node\+::int\+Value (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{class_j_s_o_n_node_af3cd36a1709f29078d5aa66b5cf21169}


返回结点的整形值 


\begin{DoxyParams}{参数}
{\em none} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
int 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
none 
\end{DoxyNote}
\hypertarget{class_j_s_o_n_node_a53f873c32ad08ed4ded611213a46d448}{\index{J\+S\+O\+N\+Node@{J\+S\+O\+N\+Node}!is\+Array\+Node@{is\+Array\+Node}}
\index{is\+Array\+Node@{is\+Array\+Node}!J\+S\+O\+N\+Node@{J\+S\+O\+N\+Node}}
\subsubsection[{is\+Array\+Node}]{\setlength{\rightskip}{0pt plus 5cm}bool J\+S\+O\+N\+Node\+::is\+Array\+Node (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{class_j_s_o_n_node_a53f873c32ad08ed4ded611213a46d448}


判断结点是否是数组型结点 


\begin{DoxyParams}{参数}
{\em none} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
false or true 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
none 
\end{DoxyNote}
\hypertarget{class_j_s_o_n_node_a87597bba651e9d48861be2178e37926f}{\index{J\+S\+O\+N\+Node@{J\+S\+O\+N\+Node}!is\+Null\+Node@{is\+Null\+Node}}
\index{is\+Null\+Node@{is\+Null\+Node}!J\+S\+O\+N\+Node@{J\+S\+O\+N\+Node}}
\subsubsection[{is\+Null\+Node}]{\setlength{\rightskip}{0pt plus 5cm}bool J\+S\+O\+N\+Node\+::is\+Null\+Node (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{class_j_s_o_n_node_a87597bba651e9d48861be2178e37926f}


判断结点是否是\+N\+U\+L\+L结点 


\begin{DoxyParams}{参数}
{\em none} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
false or true 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
none 
\end{DoxyNote}
\hypertarget{class_j_s_o_n_node_a9e9e78a2ba11a3fc05120c52ef80aed9}{\index{J\+S\+O\+N\+Node@{J\+S\+O\+N\+Node}!operator\mbox{[}$\,$\mbox{]}@{operator[]}}
\index{operator\mbox{[}$\,$\mbox{]}@{operator[]}!J\+S\+O\+N\+Node@{J\+S\+O\+N\+Node}}
\subsubsection[{operator[]}]{\setlength{\rightskip}{0pt plus 5cm}{\bf J\+S\+O\+N\+Node} J\+S\+O\+N\+Node\+::operator\mbox{[}$\,$\mbox{]} (
\begin{DoxyParamCaption}
\item[{const std\+::string}]{node\+Name}
\end{DoxyParamCaption}
)}}\label{class_j_s_o_n_node_a9e9e78a2ba11a3fc05120c52ef80aed9}


根据结点名称node\+Name获取子结点 


\begin{DoxyParams}{参数}
{\em node\+Name} & 结点名称字符串 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
返回结点对象 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
none 
\end{DoxyNote}
\hypertarget{class_j_s_o_n_node_a32aa55a0478d6efb0a88d9499467ea75}{\index{J\+S\+O\+N\+Node@{J\+S\+O\+N\+Node}!operator\mbox{[}$\,$\mbox{]}@{operator[]}}
\index{operator\mbox{[}$\,$\mbox{]}@{operator[]}!J\+S\+O\+N\+Node@{J\+S\+O\+N\+Node}}
\subsubsection[{operator[]}]{\setlength{\rightskip}{0pt plus 5cm}{\bf J\+S\+O\+N\+Node} J\+S\+O\+N\+Node\+::operator\mbox{[}$\,$\mbox{]} (
\begin{DoxyParamCaption}
\item[{sint32}]{index}
\end{DoxyParamCaption}
)}}\label{class_j_s_o_n_node_a32aa55a0478d6efb0a88d9499467ea75}


根据index获取数组结点里的元素结点 


\begin{DoxyParams}{参数}
{\em sint32} & index \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
返回index对应的数组元素 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
数组元素也是一个结点,因为数组里可以包含任意类型的结点 
\end{DoxyNote}
\hypertarget{class_j_s_o_n_node_a1d5507e362f049c46a8cbaf4cf44a730}{\index{J\+S\+O\+N\+Node@{J\+S\+O\+N\+Node}!serialize@{serialize}}
\index{serialize@{serialize}!J\+S\+O\+N\+Node@{J\+S\+O\+N\+Node}}
\subsubsection[{serialize}]{\setlength{\rightskip}{0pt plus 5cm}std\+::string J\+S\+O\+N\+Node\+::serialize (
\begin{DoxyParamCaption}
\item[{bool}]{fmt = {\ttfamily false}}
\end{DoxyParamCaption}
)}}\label{class_j_s_o_n_node_a1d5507e362f049c46a8cbaf4cf44a730}


返回串行化后的字符串 


\begin{DoxyParams}{参数}
{\em bool} & fmt 是否格式化 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
结点字符串 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
none 
\end{DoxyNote}
\hypertarget{class_j_s_o_n_node_a43a1eb525136c9c101975ff4212acfce}{\index{J\+S\+O\+N\+Node@{J\+S\+O\+N\+Node}!string\+Value@{string\+Value}}
\index{string\+Value@{string\+Value}!J\+S\+O\+N\+Node@{J\+S\+O\+N\+Node}}
\subsubsection[{string\+Value}]{\setlength{\rightskip}{0pt plus 5cm}std\+::string J\+S\+O\+N\+Node\+::string\+Value (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{class_j_s_o_n_node_a43a1eb525136c9c101975ff4212acfce}


返回结点的字符串值 


\begin{DoxyParams}{参数}
{\em none} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
返回字符串 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
none 
\end{DoxyNote}


该类的文档由以下文件生成\+:\begin{DoxyCompactItemize}
\item 
libemb/inc/\hyperlink{_j_s_o_n_data_8h}{J\+S\+O\+N\+Data.\+h}\item 
libemb/src/J\+S\+O\+N\+Data.\+cpp\end{DoxyCompactItemize}
